package a.f.d;

import a.c.d;
import a.c.k;
import a.c.m;
import a.c.n;
import a.d.w;
import a.f.*;
import a.f.mb;
import a.f.o;
import a.f.r;

import java.util.Collection;

class b
  extends r
{
  private byte g = 0;
  
  public boolean canLayout(o paramo)
  {
    return true;
  }
  
  public void doLayout(o paramo)
  {
    int j = f.o;
    int i = f.n;
    if ((j != 0) || ((a() instanceof mb))) {
      this.g = ((mb)a()).i();
    }
    k localk1 = paramo.c(ad.q);
    k localk2 = paramo.c(ad.r);
    if (j == 0) {
      if (localk1 == null)
      {
        if (j != 0) {
          break label95;
        }
        if (localk2 == null)
        {
          a().doLayout(paramo);
          if (i == 0) {
            return;
          }
        }
      }
    }
    label95:
    k localk3 = paramo.c(ed.a);
    k localk4 = paramo.c(ed.b);
    n localn1 = paramo.C();
    paramo.a(ed.a, localn1);
    n localn2 = paramo.C();
    paramo.a(ed.b, localn2);
    m localm = paramo.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      localn1.a(locald, a(locald, true, localk3, localn2, localk1, localk2, paramo));
      if (j != 0) {
        break label246;
      }
      localn2.a(locald, a(locald, false, localk3, localn2, localk1, localk2, paramo));
      localm.f();
      if (i != 0) {
        break label244;
      }
    } while (i == 0);
    if (j == 0) {
      a().doLayout(paramo);
    }
    label244:
    if (localk3 != null)
    {
      label246:
      paramo.a(ed.a, localk3);
      if (j != 0) {
        break label286;
      }
      if (i == 0) {}
    }
    else
    {
      paramo.j(ed.a);
    }
    if (j == 0)
    {
      paramo.a(localn1);
      label286:
      if (localk4 != null)
      {
        if (j != 0) {
          break label318;
        }
        paramo.a(ed.b, localk4);
        if (i == 0) {
          break label317;
        }
      }
    }
    paramo.j(ed.b);
    label317:
    label318:
    paramo.a(localn2);
  }
  
  private cd a(d paramd, boolean paramBoolean, k paramk1, k paramk2, k paramk3, k paramk4, o paramo)
  {
    int i = f.o;
    cd localcd = null;
    if (i == 0) {
      if ((paramBoolean) && ((i != 0) || (paramk1 != null)))
      {
        localcd = (cd)paramk1.get(paramd);
        break label68;
      }
    }
    if (!paramBoolean) {
      if ((i != 0) || (paramk2 != null)) {
        localcd = (cd)paramk2.get(paramd);
      }
    }
    label68:
    if (i == 0) {
      if (localcd == null)
      {
        Collection localCollection;
        ad localad;
        double d1;
        double d2;
        if (i == 0) {
          if ((paramBoolean) && ((i != 0) || (paramk3 != null)))
          {
            localCollection = (Collection)paramk3.get(paramd);
            if (((i == 0) && (localCollection == null)) || ((i == 0) && (localCollection.size() != 1))) {
              break label360;
            }
            localad = (ad)localCollection.iterator().next();
            if (i == 0)
            {
              if (localad.b())
              {
                d1 = localad.c(this.g);
                d2 = localad.d(this.g);
                paramo.a(paramd, new w(d1, d2));
              }
              if (i != 0) {
                break label362;
              }
              localcd = localad.a(this.g);
            }
          }
        }
        if ((f.n != 0) && (!paramBoolean)) {
          if ((i != 0) || (paramk4 != null))
          {
            localCollection = (Collection)paramk4.get(paramd);
            if (((i != 0) || (localCollection != null)) && ((i != 0) || (localCollection.size() == 1)))
            {
              localad = (ad)localCollection.iterator().next();
              if (i == 0) {
                if (localad.b())
                {
                  d1 = localad.c(this.g);
                  d2 = localad.d(this.g);
                  paramo.b(paramd, new w(d1, d2));
                }
              }
              localcd = localad.a(this.g);
            }
          }
        }
      }
    }
    label360:
    label362:
    return localcd;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.b

 * JD-Core Version:    0.7.0.1

 */